1. Field of the Invention
The present invention generally relates to a method of controlling a plurality of tone generator drivers of different types in an integrated manner, and a machine readable medium storing a control program for a plurality of tone generator drivers.
2. Description of Related Art
Recently, rapid enhancement in the computational capabilities of microprocessors (or CPUs) has been increasingly finding their applications in general-purpose computers and tone generators. Execution of a tone generating program or module on these general-purpose computers has realized systems for generating tone waveform data. On the other hand, generation of tone waveform data by means of a dedicated hardware device having a circuit configuration adapted to the tone generation is practiced conventionally.
FIG. 13 shows a software configuration used in a conventional tone generating system supported by computer software. An operating system (OS) 101 for this tone generating system is Windows 95 (trademark of Microsoft Corporation) for example. The OS 101 has an interface IF1 (MIDI-Out API) and an interface IF2 (MIDI-Out API) that transfer MIDI (Musical Instrument Digital Interface) messages representing performance information for generating tone waveform data, and an interface IF3 (WAVE-Out API) that transfers generated tone waveform data.
In the example shown, the interface IF1 (MIDI-Out API) is used as an interface for a software tone generator adapted to generate tone waveform data by having a CPU (central processing unit) execute a predetermined tone generating program. The interface IF2 (MIDI-Out API) is used for a hardware tone generator adapted to generate tone waveform data by means of a dedicated hardware device having a circuit configuration suitable for a particular tone generating scheme.
Music application software 100 for generating a MIDI message is located in the application layer for generating performance information in the form of a MIDI message in a real-time manner. A second MIDI driver (a hardware tone generator) and a third MIDI driver (a software tone generator) are installed on the OS 101. The second MIDI driver supplies control data based on the MIDI message to an external hardware tone generator 103. The third MIDI driver is a kind of an application software.
In the example shown in FIG. 13, the MIDI message generated by the music application software 100 is received by the third MIDI driver through the interface IF1 (MIDI-Out API) provided on the OS 101. Having received the MIDI message, the third MIDI driver generates the tone waveform data based on the received MIDI message and supplies through the interface IF3 (WAVE-Out API) the generated tone waveform data to a first WAVE driver installed on the OS 101. The first WAVE driver reads through a direct memory access (DMA) controller the tone waveform data stored in a buffer memory, and supplies the read data to a CODEC (COder/DECoder) 105, which is an external hardware device. The CODEC 105 converts the tone waveform data into an analog tone signal, which is then sounded from a sound system not shown.
The third MIDI driver computes tone waveform data a sample by sample within one frame period, thereby generating one frame of the tone waveform data. The generated tone waveform data is stored in a buffer memory. The third MIDI driver generates one frame of tone waveform data while controlling a delay time of the computation for data generation and controlling an amount of tone waveform data generated in a unit time. A subroutine library 102 of the third MIDI driver stores general-purpose modules (or subroutines) for use in the computation for generating tone waveform data such as a digital filter, an interpolator, and a mixer. By use of these general-purpose modules, the third MIDI driver generates tone waveform data having required musical properties such as pitch and timbre.
In the conventional computer-based tone generating system as shown in FIG. 13, a MIDI message generated by the music application software 100 is received by the third MIDI driver through the interface IF1 (MIDI-Out API) provided in the OS 101. Alternatively, the tone generating system may be programmed so that a MIDI message generated by the music application software 100 is received by the second MIDI driver through the other interface IF2 (MIDI-Out API) provided in the OS 101. In this case, the second MIDI driver supplies the tone control data based on the received MIDI message to the external hardware tone generator 103, in which a tone waveform is generated based on the tone control data and the generated tone waveform is sounded.
However, the above-mentioned conventional tone generating system presents a problem that, because this system can set up a MIDI driver only before starting music performance, this system cannot dynamically change MIDI drivers during the music performance. Therefore, the conventional tone generating system cannot generate tone waveform data for different performance parts by use of different tone generators in the sounding of the generated tone waveform data.
Another problem involved in the conventional tone generating system is that a MIDI driver not installed on the operating system cannot be used. Newly installing a MIDI driver onto the operation system requires cumbersome operations such as rebooting the system.
Generating tones by use of a software tone generator requires a WAVE driver. If a plurality of MIDI drivers each constituted by a software tone generator are used, a plurality of WAVE drivers are required, presenting a problem of shortage of WAVE drivers during the music performance. It is not possible for the conventional system to open a new WAVE driver even when the system suffers from the shortage of the existing WAVE driver. Further, in the case where a plurality of MIDI drivers each constituted by a software tone generator are used, the conventional tone generating system does not consider control on relative delay times caused in computing process of the generation of tone waveform data among the plurality of the tone generators, nor does consider on variation of the amount of tone waveform data generated in a unit time among the plurality of the tone generators.
It is therefore an object of the present invention to provide a method of controlling a plurality of tone generating drivers, the method being capable of using MIDI drivers without installing the same on the operating system and being capable of dynamically switching the installed MIDI drivers during the music performance. It is another object of the present invention to provide a method of controlling a plurality of tone generating drivers, the method being capable of using no more than one WAVE driver even if a plurality of MIDI drivers are used and being capable of eliminating the necessity for executing time control on tone waveform data for each MIDI driver. It is a further object of the present invention to provide a control method capable of integrating a plurality of tone generating drivers for organized control thereof.
In order to achieve the objects, in a fist aspect of the invention, a method is designed for controlling a plurality of tone generating drivers by an integrating driver installed in an operating system to generate music tones according to performance data created by a music application software. The inventive method comprises the steps of inputting the performance data created by the music application software to the integrating driver through an application program interface provided by the operating system, distributing the performance data from the integrating driver to one or more of the tone generating drivers provisionally registered to the integrating driver, operating the registered tone generating driver to generate waveform data of a music tone at a specific sampling frequency based on the distributed performance data, streaming the waveform data from the registered tone generating driver to the integrating driver, converting the specific sampling frequency of the streamed waveform data into a common sampling frequency by the integrating driver, mixing the waveform data of the common sampling frequency to other waveform data streamed from other tone generating driver while synchronizing progression of the waveform data with progression of other waveform data, and reproducing the mixed waveform data at the common sampling frequency to output the music tones. By such a method, the system can freely add and delete tone generating drivers having different sampling frequencies of the tone waveform data. Further, it is not necessary to increase a number of application program interfaces of the operating system for feeding the performance data to the tone generating drivers even if another tone generating driver is added.
Preferably, in the first aspect, the step of reproducing comprises feeding the mixed waveform data through another application program interface provided by the operating system to a wave driver installed in the operating system for reproducing the mixed waveform data at the common sampling frequency. By such a method, it is not necessary to increase a number of application program interfaces for feeding the waveform data to the WAVE driver even if a tone generating driver is added since the common interface provided by the operating system is used for transferring the waveform data generated by any tone generating drivers to the WAVE driver.
In a second aspect of the invention, a method is designed for controlling a plurality of tone generator modules by an integrator module for generating music tones according to performance data being created by a music application software and being composed of a plurality of timbre parts. The inventive method comprises the steps of registering a plurality of tone generator modules for control by the integrator module such that each registered tone generator module is operable under control by the integrator module to generate waveform data of a music tone in accordance with the performance data, allocating the timbre parts of the performance data to the registered tone generator modules to establish correspondence between each timbre part and each tone generator module, distributing each timbre part of the performance data from the integrator module to each tone generator module in accordance with the established correspondence so as to operate the plurality of the tone generator modules concurrently with each other to generate a plurality of waveform data representing a plurality of music tones corresponding to the plurality of the timbre parts, and mixing the plurality of the waveform data with each other to output the music tones in accordance with the performance data. By such a method, the inventive system can dynamically allocate the timbre parts of the inputted performance data to the registered tone generating modules.
In a third aspect of the invention, a method is designed for controlling a plurality of tone generator modules by an integrator module for generating music tones according to performance data being created by a music application software and being composed of a plurality of performance parts. The inventive method comprises the steps of registering a plurality of tone generator modules for control by the integrator module such that each registered tone generator module can carry out a task of processing the performance data to generate waveform data under control by the integrator module, probing each tone generator module to detect a time lag of the task from an input timing of the performance data to an output timing of the waveform data, allocating the performance parts of the performance data to the tone generator modules to establish correspondence between each performance part and each tone generator module, delivering each performance part of the performance data from the integrator module to each tone generator module in accordance with the established correspondence at a variable input timing, adjusting the input timings of the performance parts of the performance data so as to compensate for the detected time lags among the tone generator modules, thereby synchronizing the output timings of the waveform data from the tone generator modules, and mixing the waveform data generated by the plurality of the tone generator modules to produce the music tones. By such a method, the inventive system can synchronously reproduce the tone waveform data generated by the tone generator modules having different processing speeds by adjusting the input timings of the waveform data to the respective tone generator modules.
In a fourth aspect of the invention, a method is designed for controlling a plurality of tone generator modules by an integrator module on an operating system to generate music tones in accordance with performance data being created by a music application software and being composed of parts. The inventive method comprises the steps of feeding the performance data created by the music application software to the integrator module through an application program interface provided by the operating system, registering a plurality of tone generator modules for control by the integrator module, each tone generator module being executable on the operating system to generate waveform data of a music tone according to the performance data, opening an individual interface dedicated to each of the registered tone generator modules for communication with the integrator module, allocating the performance data to the tone generator modules a part by part, delivering each allocated part of the performance data from the integrator module to each tone generator module through the individual interface dedicated to each tone generator module so as to generate the waveform data, and collecting the waveform data generated by the registered tone generator modules to the integrator module and mixing the collected waveform data to generate the music tones. By such a method, the interfaces are flexibly opened in correspondence to the registered tone generator modules, hence a number of the registered tone generator modules or tone generating programs can be freely changed.
Preferably, in the fourth aspect, the step of registering comprises registering the tone generator modules including a standard tone generator module and a non-standard tone generator module, the step of opening comprises opening a first individual interface provided by the integrator module independently from the operating system for the standard tone generator module and opening a second individual interface provided by the operating system for the non-standard tone generator module, and the step of delivering comprises delivering the performance data to the standard tone generator module through the first individual interface and delivering the performance data to the non-standard tone generator module through the second individual interface. By such a method, the system can conduct a joint performance by the standard and non-standard ones of the tone generator modules through the integrator module. The integrator module can provide interfaces to the tone generator modules if they are designed in agreement with the standard of the integrator module without using interfaces provided by the operating system, thereby avoiding shortage of the application program interfaces.
In a fifth aspect of the invention, a method is designed for controlling a plurality of tone generator modules by an integrator module on an operating system for generating music tones according to performance data being created by a music application software and being composed of parts. The inventive method comprises the steps of feeding the performance data created by the music application software to the integrator module through an application program interface provided by the operating system, registering a plurality of tone generator modules for control by the integrator module, each tone generator module being executable on the operating system to generate waveform data of a music tone according to the performance data, opening a data stream path between the integrator module and each of the registered tone generator modules, allocating the performance data to the registered tone generator modules a part by part, delivering each allocated part of the performance data from the integrator module to each tone generator module so as to enable each tone generator module to generate the waveform data, and collecting the waveform data generated by each tone generator module to the integrator module through each data stream path and mixing the collected waveform data to generate the music tones. By such a method, the integrator module opens the individual data stream paths to the registered tone generator modules, hence it is possible to freely increase or decrease the number of the registered tone generator modules.
Preferably, in the fifth aspect, the step of registering comprises registering the tone generator modules including a standard tone generator module and a non-standard tone generator module, the step of opening comprises opening one data stream path provided by the integrator module independently from the operating system for the standard tone generator module and opening another data stream path in the form of an interface provided by the operating system for the non-standard tone generator module, and the step of collecting comprises collecting the waveform data from the standard tone generator module through said one data stream path and collecting the waveform data from the non-standard tone generator module through said another data stream path. By such a method, the inventive system can conduct a joint performance by the standard and non-standard ones of the tone generator modules through the integrator module. The integrator module can provide stream paths of the waveform data between the integrator module and the respective tone generator modules if they are designed in agreement with the standard of the integrator module without using interfaces provided by the operating system, thereby avoiding shortage of the application program interfaces.
In a sixth aspect of the invention, a method is designed for controlling a plurality of tone generator modules by an integrator module on an operating system for generating music tones according to performance data being created by a music application software and being composed of parts. The inventive method comprises the steps of feeding the performance data created by the music application software to the integrator module through an application program interface provided by the operating system, registering a plurality of tone generator modules for control by the integrator module, allocating the performance data a part by part to the registered tone generator modules and delivering each allocated part of the performance data to each corresponding tone generator modules from the integrator module, applying triggers individually to the tone generator modules to cause the tone generator modules to progressively generate waveform data corresponding to the allocated parts of the performance data in response to the triggers, collecting the waveform data generated by the tone generator modules to the integrator module and mixing the collected waveform data to output the music tones, monitoring progressions in the generation of the waveform data by the tone generator modules to discriminate between lagging one and advancing one of the tone generator modules, and controlling application of the triggers to balance the progression of the generation of the waveform data among the lagging tone generator module and the advancing tone generator module. By such a method, the integrator module manages operation states of all the tone generator modules to thereby balance the tone generator modules.